<template>
  <div class="bd">
    <div class="inner">
      <el-select v-model="businessType" placeholder="请选择申请业务">
        <el-option
          v-for="item in options"
          :key="item.id"
          :label="item.name"
          :value="item.id"
        ></el-option>
      </el-select>
      <el-button type="primary" @click="submit">确定</el-button>
    </div>
  </div>
</template>
  
  <script>

export default {
  components: {},
  data() {
    return {
      options: [],
      businessType: '',

    };

  },

  mounted() {
    this.init();
  },
  computed: {
  },

  methods: {
    init(){

      this.$api
        .formPost("/api/flowact/deployments/getModelVOList")
        .then(res => {
          if (res.retHead.code == "0000000") {
            this.options=res.retBody;
            
          } else {
            this.$message({
              message: res.retHead.message,
              type: "error"
            });
          }
        });
      
    },
    submit() {
      if (this.businessType) {
        let path = "/activity/applymain"
        this.$router.push({
          path: path,
          query: { modelId: this.businessType }
        });
      } else {
        this.$message({
          message: "请先选择业务！",
          type: "error"
        });
      }
    }
  },
  created() { }
};
  </script>
  <style lang='scss' scoped>
  .bd{
    position: relative;
    width: 100%;
    height: 100%;
    .inner{
      position: absolute;
      top: 50%;
      left: 50%;
      transform: translate(-50% ,-50%)
    }
  }
</style>